import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 报警次数
 */
export const alarmCount = (): AxiosPromise<any> => {
  return request({
    url: '/index/screen/alarmCount',
    method: 'get'
  });
};
/**
 * 报警排名
 */
export const alarmRank = (): AxiosPromise<any> => {
  return request({
    url: '/index/screen/alarmRank',
    method: 'get'
  });
};
/**
 * 设备总览
 */
export const deviceOverview = (): AxiosPromise<any> => {
  return request({
    url: '/index/screen/deviceOverview',
    method: 'get'
  });
};
/**
 * 设备提醒
 */
export const deviceRemind = (query?: any): AxiosPromise<any> => {
  return request({
    url: '/index/screen/deviceRemind',
    method: 'get',
    params: query
  });
};
/**
 * 安装计划
 */
export const installPlan = (): AxiosPromise<any> => {
  return request({
    url: '/index/screen/installPlan',
    method: 'get'
  });
};
/**
 * 设备分布
 */
export const communityDistribution = (query?: any): AxiosPromise<any> => {
  return request({
    url: '/index/screen/communityDistribution',
    method: 'get',
    params: query
  });
};
/**
 * 实时预警
 */
export const realTimeWarning = (query?: any): AxiosPromise<any> => {
  return request({
    url: '/index/screen/realTimeWarning',
    method: 'get',
    params: query
  });
};
